<!DOCTYPE html>
<html>
    <head>
        <title>职统</title>
        <link rel="stylesheet" href="/styles/common.css"/>
        <style type="text/css">
            
        </style>
    </head>
    <body>
        <#include "top.ftl">
        <div class="page-body">
            <#include "leftmenu.ftl">
            <div class="page-content">
                <div class="content-nav">
                    人员管理 > 注册审批
                </div>
                <table class="listtable">
                    <caption>所有待审批注册信息：</caption>
                    <tr class="listheader">
                        <th>姓名</th>
                        <th>账号名</th>
                        <th>联系电话</th>
                        <th>电子邮件</th>
                        <th>操作</th>
                    </tr>
                    <#if emps ??>
                        <#list emps as emp>
                            <tr>
                                <td>${emp.employeename}</td>
                                <td>${emp.username}</td>
                                <td>${emp.phone}</td>
                                <td>${emp.email}</td>
                                <td>
                                    <a type="button" class="clickbutton" href="/admin/updatestatus?employeeid=${emp.employeeid}&status=1">通过</a>
                                    <a type="button" class="clickbutton" href="/admin/updatestatus?employeeid=${emp.employeeid}&status=2">不通过</a>
                                </td>
                            </tr>
                        </#list>
                    </#if>

                </table>
                <table class="listtable">
                    <caption>所有待审批升职信息：</caption>
                    <tr class="listheader">
                        <th>姓名</th>
                        <th>账号名</th>
                        <th>联系电话</th>
                        <th>当前职位</th>
                        <th>想要晋升</th>
                        <th>操作</th>
                    </tr>
                    <#if lsup ??>
                        <#list lsup as lp>
                            <tr>
                                <td>${lp.employeename}</td>
                                <td>${lp.username}</td>
                                <td>${lp.phone}</td>
                                <td>${(lp.role==0)?string('员工','')}${(lp.role==1)?string('组长','')}${(lp.role==2)?string('管理员','')}${(lp.role==3)?string('超级管理员','')}</td>
                                <td>${(lp.role==0)?string('组长','')}${(lp.role==1)?string('管理员','')}${(lp.role==2)?string('超级管理员','')}${(lp.role==3)?string('supboss','')}</td>
                                <td>
                                    <a type="button" class="clickbutton" href="/admin/updatepromoted?employeeid=${lp.employeeid}&role=${lp.role}&status=1">通过</a>
                                    <a type="button" class="clickbutton" href="/admin/updatepromoted?employeeid=${lp.employeeid}&role=${lp.role}&status=2">不通过</a>
                                </td>
                            </tr>
                        </#list>
                    </#if>
                </table>
                <#if status??><span style="color: red">${(status==0)?string('操作失败','操作成功')}</span></#if>
            </div>
        </div>
        <div class="page-footer">
            <hr/>
            欢迎使用
        </div>
    </body>
</html>